<!DOCTYPE html>
<html lang="en">
<head>
    {include file="Public/header"}
</head>
<body>
      <div class="page-heade">
       <h2 class="title_color text-center">反馈审核--临时</h2>
    </div>
    <div class="content">
        <table class="table table-bordered">

            <tr>
                <th>sn</th>
                <th>title</th>
                <th>created_on</th>
                <th>申请人</th>
                <th>类型</th>
                <th>操作</th>
            </tr>
            {volist name="data" id="row"}
            <tr>
                <td>{$row.no}</td>
                <td>{$row.title}</td>
                <td>{$row.created_on}</td>
                <td>{$row.c_user_id}</td>
                <td>{$row.cate_title}</td>
                <td>
                    {if $row.state==1}
                    <button type="button" class="tongguo" data-id="{$row.id}">审核通过</button>
                    <button type="button" class="dahui" data-id="{$row.id}">打回</button>
                    {elseif $row.state==3}
                    已审核通过
                    {elseif $row.state==4}
                    已打回
                    {/if}
                </td>
            </tr>
            {/volist}
        </table>
    </div>
</body>
{include file="Public/footer"}
<script>
    $(function () {
        $('.tongguo').on('click',function () {
            var id = $(this).data('id')
            $.post('{:url("shenhe")}',{id:id,state:3},function (data) {
                if(data.success){
                    location.reload()
                }else{
                    swal(data.msg)
                }
            },'json')
        })
        $('.dahui').on('click',function () {
            var id = $(this).data('id')
            $.post('{:url("shenhe")}',{id:id,state:4},function (data) {
                if(data.success){
                    location.reload()
                }else{
                    swal(data.msg)
                }
            },'json')
        })
    })
</script>
</html>